function check_result(fname,s)
eval(['load ',fname,';']);
load mnist_label;
load mnist_knn_cos_sup;
l = 60000;
n = size(Y,1);
Yt = Y(1:l);
Ys = Y(l+1:n);
VV = VV(:,1:s);
tic
Yp = mcpsvm(VV,Yt);
slvtime = toc
trerr = calerr(Yp(1:l),Yt)
tserr = calerr(Yp(l+1:n),Ys)
mis = find(Yp(l+1:n)~=Ys);
nm = size(mis,1);
load mnist_test;
for i = 1:nm
    imshow(reshape(Xu(mis(i),:),28,28));
    Yp(l+mis(i))
    Ys(mis(i))
    Yt(nn(l+mis(i),:))
    pause
end
end

knnsearch